package cn.yusei.teamTribe.constant;

import java.lang.reflect.Field;

public class MessageType {

	public static final int RELATION_REQUEST = 1;
	
	public static final int RELATION_RESPONSE = 2;
	
	public static final int TEAM_MEMBER_REQUEST = 3;
	
	public static final int TEAM_MEMBER_RESPONSE = 4;
	
	private static final Field[] fields = MessageType.class.getFields();
	
	public static boolean isMessageType(int messageType)
	{
		for(Field field : fields)
		{
			try
			{
				if(field.getInt(MessageType.class) == messageType)
					return true;
			}
			catch (Exception e)
			{
				e.printStackTrace();
			}
		}
		return false;
	}
}
